<template>
	<div class="zco-view-container">
		<Request
			v-if="businessType === 'peer-cmd'"
			:toUserName="message.toUserInfo.userName"
			:toUserRole="message.toUserInfo.role"
			:url="message && message.data && message.data.data && message.data.data.url ? message.data.data.url : ''"
			:fileName="message && message.data && message.data.data && message.data.data.name ? message.data.data.name : ''"
			:fromUserName="fromUserName"
			:richTextData="message && message.data && message.data.data && message.data.data.data ? message.data.data.data : ''"
			:type="message && message.data && message.data.data && message.data.data.type ? message.data.data.type : ''"
			:subType="message && message.data && message.data.data && message.data.data.subType ? message.data.data.subType : ''"
		/>
		<Response v-if="businessType === 'peer-response'" :toUserName="message.toUserInfo.userName" :toUserRole="message.toUserInfo.role" :status="message.data.status" />
	</div>
</template>
<script>
import Request from './components/Request.vue';
import Response from './components/Response.vue';
export default {
	name: 'APP',
	components: { Request, Response },
	props: {
		businessType: {
			type: String,
			default: () => ''
		},
		message: {},
		fromUserName: {}
	},
	data() {
		return {};
	},
	methods: {},
	created() {},
	mounted() {}
};
</script>
<style scoped></style>
